package com.ruoyi.project.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.business.mapper.QuestionMapper;
import com.ruoyi.project.business.domain.Question;
import com.ruoyi.project.business.service.IQuestionService;

/**
 * 题库管理Service业务层处理
 *
 * @author hongwj
 * @date 2024-09-26
 */
@Service
public class QuestionServiceImpl implements IQuestionService {
    @Autowired
    private QuestionMapper questionMapper;

    @Override
    public List<Question> selectQuestionsByIds(List<Long> ids) {
        return questionMapper.selectQuestionsByIds(ids);
    }


    /**
     * 查询题库管理
     *
     * @param id 题库管理主键
     * @return 题库管理
     */
    @Override
    public Question selectQuestionById(Long id) {
        return questionMapper.selectQuestionById(id);
    }

    /**
     * 查询题库管理列表
     *
     * @param question 题库管理
     * @return 题库管理
     */
    @Override
    public List<Question> selectQuestionList(Question question) {
        return questionMapper.selectQuestionList(question);
    }

    /**
     * 新增题库管理
     *
     * @param question 题库管理
     * @return 结果
     */
    @Override
    public int insertQuestion(Question question) { return questionMapper.insertQuestion(question); }

    /**
     * 修改题库管理
     *
     * @param question 题库管理
     * @return 结果
     */
    @Override
    public int updateQuestion(Question question) {
        return questionMapper.updateQuestion(question);
    }

    /**
     * 批量删除题库管理
     *
     * @param ids 需要删除的题库管理主键
     * @return 结果
     */
    @Override
    public int deleteQuestionByIds(Long[] ids) {
        return questionMapper.deleteQuestionByIds(ids);
    }

    /**
     * 删除题库管理信息
     *
     * @param id 题库管理主键
     * @return 结果
     */
    @Override
    public int deleteQuestionById(Long id) {
        return questionMapper.deleteQuestionById(id);
    }
}
